﻿using PHRClient.DoctorForms.PatientRegister;
using PHRClient.PatientForms;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace PHRClient.PatientForms
{
    public partial class AddDetails : Form
    {

        public static AddHistory2 history2 = null;
        public static AddHistory3 history3 = null;
        public static AddHistory4 history4 = null;
        public static AddHistory5 history5 = null;
        public static NewRecord newRecord = null;

        public AddDetails()
        {
            InitializeComponent();

            history2 = new AddHistory2();
            history3 = new AddHistory3();
            history4 = new AddHistory4();
            history5 = new AddHistory5();
            newRecord = new NewRecord();

            RegisterContainer.Controls.Clear();
            RegisterContainer.Controls.Add(history2);
            history2.Show();

            this.TopLevel = false;
            this.AutoScroll = true;
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            this.Dock = DockStyle.Fill;

            PHRDetails.DataContainer.Controls.Clear();
            PHRDetails.DataContainer.Controls.Add(this);
        }
        

        private void register_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void history2_Click(object sender, EventArgs e)
        {
            RegisterContainer.Controls.Clear();
            RegisterContainer.Controls.Add(history2);
            history2.Show();
        }

        private void historyButton3_Click(object sender, EventArgs e)
        {
            RegisterContainer.Controls.Clear();
            RegisterContainer.Controls.Add(history3);
            history3.Show();
        }

        private void historyButton4_Click(object sender, EventArgs e)
        {
            RegisterContainer.Controls.Clear();
            RegisterContainer.Controls.Add(history4);
            history4.Show();
        }

        private void historyButton5_Click(object sender, EventArgs e)
        {
            RegisterContainer.Controls.Clear();
            RegisterContainer.Controls.Add(history5);
            history5.Show();
        }

        private void historyCharts_Click(object sender, EventArgs e)
        {
            RegisterContainer.Controls.Clear();
            RegisterContainer.Controls.Add(newRecord);
            newRecord.Show();
        }

        private void saveData_Click(object sender, EventArgs e)
        {
            newRecord.button1_Click(sender, e);
        }
    }
}
